Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libstd: fix off-by-one error in def of ProcSym in pdb.zig #12464

Merged
merged 1 commit into from Aug 17, 2022
Merged

Conversation

kubkon
Copy link
Member

@kubkon kubkon commented Aug 17, 2022

Fixes: #12422

Make sure ProcSym includes a single element byte-array which delimits the start of the symbol's name as part of its definition. This makes the code more elegant in that accessing the name is equivalent to taking the address of this one element array.

Prior to this fix, ProcSym was defined as packed struct and reported size of 35. After it was changed to extern struct in b959427 the size reported is rounded to 36 (which is correct). However, according to https://github.com/microsoft/microsoft-pdb/blob/082c5290e5aff028ae84e43affa8be717aa7af73/include/cvinfo.h#L3722 ProcSym should include a one-element byte array which delimits the start of the symbol name which brings the size of ProcSym to 36 without padding.

Make sure `ProcSym` includes a single element byte-array which delimits
the start of the symbol's name as part of its definition. This makes
the code more elegant in that accessing the name is equivalent to taking
the address of this one element array.
@andrewrk
Copy link
Member

Nice find!

@andrewrk andrewrk merged commit 070282a into master Aug 17, 2022
@andrewrk andrewrk deleted the fix-12422 branch August 17, 2022 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stack traces tests failing on Windows
2 participants